import React from 'react'
import { useParams, useMatch } from 'react-router-dom'

export default function Detail() {
  const {id, title, content} = useParams()
  // const x = useMatch("/home/message/detail/:id/:title/:content") // 需要路径进行匹配
  // console.log(x)

  return (
    <div>
      <p>消息编号：{id}</p>
      <p>消息标题：{title}</p>
      <p>消息内容：{content}</p>
    </div>
  )
}
